#pragma once
#include "VSM.h"
#include "Tip.h"

class USERGUIDE : public CWnd,public IACTIVEMODEL,public IDSIMMODEL
{
	DECLARE_DYNAMIC(USERGUIDE)

public:
	USERGUIDE();
	virtual ~USERGUIDE();
	INT isdigital (CHAR *pinname);
	VOID setup (IINSTANCE *inst, IDSIMCKT *dsim);
	VOID runctrl (RUNMODES mode);
	VOID actuate (REALTIME time, ACTIVESTATE newstate);
	BOOL indicate (REALTIME time, ACTIVEDATA *data);
	VOID simulate (ABSTIME time, DSIMMODES mode);
	VOID callback (ABSTIME time, EVENTID eventid);

	VOID initialize (ICOMPONENT *cpt);
	ISPICEMODEL *getspicemodel (CHAR *device);
	IDSIMMODEL *getdsimmodel (CHAR *device);
	VOID plot (ACTIVESTATE state);
	VOID animate (INT element, ACTIVEDATA *newstate);
	BOOL actuate (WORD key, INT x, INT y, DWORD flags);
private:
	IINSTANCE *instance;
	IDSIMCKT *ckt;
	ICOMPONENT *component;
	IDSIMPIN *PINDATA[8];
	IDSIMPIN *PINOUT[8];
	IDSIMPIN *PINCLK;
	unsigned char data;
	BOX Drawarea;
	EVENT *event;
	CTip* m_Tip;
protected:
	DECLARE_MESSAGE_MAP()
};


